<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#tabel_history_donasi').dataTable({
			"sPaginationType":"full_numbers",
			"bStateSave": true
		});
	} );
</script>
<style>
	div#tabel_history_donasi_wrapper th{
		background-color: #0066CC;
		color : #fff;
		text-align: center;
	}
	div#tabel_history_donasi_wrapper tr.odd{
		background-color: #e0f2be;
	}
	
	div#tabel_history_donasi_wrapper tr:hover{
		background-color: chartreuse;
	}
</style>
<center>
    <div class="contentIsi">
		<table align="center" width="850px">
			<tr>
				<td>
					<div id="table">
<table border="0" width="95%" id="tabel_history_donasi">
    <thead>
                <tr>
                    <th>Nama</th>
                    <th>Tanggal</th>
                    <th>Jumlah Tambahan</th>
                    <th>Rekening</th>
                    <th>Status</th>
                    <th>Bank</th>
                    <th>Aksi</th>
                </tr>
                </thead>
                <tbody>
                <?php    
                for($i=0;$i<count($row);$i++){
                    echo "<tr>";
                    echo "<td>".$row[$i]['nama']."</td>";
                    echo "<td>".$row[$i]['tanggal']."</td>";
                    echo "<td>".$row[$i]['jumlah_tambahan']."</td>";
                    echo "<td>".$row[$i]['rekening2']."</td>";
                    echo "<td>".$row[$i]['status2']."</td>";
                    echo "<td>".$row[$i]['bank2']."</td>";
                    if ($row[$i]['status2']=='Requested')
                    {
                        echo "<td><a href='".  base_url()."admin/ctrl_donatur/approve_tambah_donasi/".$row[$i]['idtambah_donasi']."/".$type."'>approve</a>|";
                        echo "<a href='".  base_url()."admin/ctrl_donatur/reject_tambah_donasi/".$row[$i]['idtambah_donasi']."/".$type."'>reject</a></td>";
                    }
                    if ($row[$i]['status2']=='Approved')
                        echo "<td><a href='".  base_url()."admin/ctrl_donatur/cancel_approve_tambah_donasi/".$row[$i]['idtambah_donasi']."/".$type."'>cancel</a></td>";
                    if ($row[$i]['status2']=='Rejected')
                        echo "<td><a href='".  base_url()."admin/ctrl_donatur/cancel_rejected_tambah_donasi/".$row[$i]['idtambah_donasi']."/".$type."'>cancel</a></td>";
                    echo "</tr>";
                }
                
                ?>
                    </tbody>
            </table>
						</div>
				</td>
			</tr>
		</table>
	</div>
</center>